package cn.tx.redis7.iomultiplex.bio.read.mthread;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.Scanner;

/**
 * @author jizenan
 * @date 2025/6/17
 * Description:
 */
public class RedisClient02 {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1",6380);
        OutputStream outputStream = socket.getOutputStream();
        while (true){
            Scanner scanner = new Scanner(System.in);
            String string = scanner.next();
            if(string.equalsIgnoreCase("quit")){
                break;
            }
            outputStream.write(string.getBytes());
            System.out.println("------RedisClient02 input keyword to finish.......");
        }
        outputStream.close();
        socket.close();
    }
}
